// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html




import MapManager from "./map/MapManager";
import ShapeManager from "./shape/ShapeManager";
import UIManager from "./ui/UIManager";


const {ccclass, property} = cc._decorator;

@ccclass
export default class GameManager extends cc.Component {

    private static instance: GameManager;
    public static getInstance(): GameManager {
        if (!this.instance) {
            console.error("GameManager is not onLoad");
        }
        return this.instance;
    }

    protected onLoad(): void {
        GameManager.instance = this;
    }

    async start() {
        UIManager.getInstance();
        MapManager.getInstance();
        ShapeManager.getInstance();

        UIManager.getInstance().show("UIGame");
    }


}
